import App from "@/App";
import { BrowserRouter, Routes, Route,Navigate } from "react-router-dom";
import Home from '@/views/Home'
import About from '@/views/About'

const baseRouter = () => (
    <BrowserRouter>
        <Routes>
            <Route path="/" element={<App></App>}>
                <Route path="/home" element={<Home></Home>}></Route>
                <Route path="/about" element={<About></About>}></Route>
                {/* 重定向 */}
                <Route path="/" element={<Navigate to="/about" />}></Route>
            </Route>
        </Routes>
    </BrowserRouter>
)

export default baseRouter